Skip to content

Fix Hwloc parse error in test/runtests.jl (includes #676) #677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

ChrisRackauckas-Claude
Copy link

Summary

  • Fixes the ArgumentError parse issue that occurs when Hwloc functions fail on certain CI environments (e.g., macOS aarch64)
  • Includes all changes from PR Fix subpackage source definitions and update compat entries  #676
  • Adds try-catch blocks around Hwloc.num_physical_cores() and Hwloc.num_virtual_cores() calls with appropriate fallbacks

Problem

The CI fails with:

ERROR: LoadError: ArgumentError: input string is empty or only contains whitespace

This happens when Hwloc.num_physical_cores() or Hwloc.num_virtual_cores() fail on certain systems, causing the parse function to receive an invalid string.

Solution

Wrapped the Hwloc calls in try-catch blocks with sensible fallback values (0 workers for physical cores, 1 thread for virtual cores) to ensure the tests can still run even when Hwloc is not available or fails.

Test plan

  • Tests now start successfully without parse errors
  • CI should pass on macOS aarch64 and other affected platforms

Fixes the error from https://github.com/SciML/NonlinearSolve.jl/actions/runs/16882652406/job/47822213017?pr=676

🤖 Generated with Claude Code

ChrisRackauckas and others added 11 commits August 10, 2025 22:42
- Add missing [sources] sections for SciMLJacobianOperators in NonlinearSolveBase and NonlinearSolveFirstOrder
- Add missing dependencies and [sources] section for SCCNonlinearSolve (NonlinearSolve, NonlinearSolveBase, NonlinearSolveFirstOrder)
- Update all inter-repo dependency compat entries to current versions
- Bump minor version for all packages:
  - NonlinearSolve: 4.10.0 -> 4.11.0
  - BracketingNonlinearSolve: 1.3.0 -> 1.4.0
  - NonlinearSolveBase: 1.14.0 -> 1.15.0
  - NonlinearSolveFirstOrder: 1.7.0 -> 1.8.0
  - NonlinearSolveHomotopyContinuation: 0.1.5 -> 0.2.0
  - NonlinearSolveQuasiNewton: 1.8.0 -> 1.9.0
  - NonlinearSolveSciPy: 1.0.0 -> 1.1.0
  - NonlinearSolveSpectralMethods: 1.3.0 -> 1.4.0
  - SCCNonlinearSolve: 1.4.0 -> 1.5.0
  - SciMLJacobianOperators: 0.1.8 -> 0.2.0
  - SimpleNonlinearSolve: 2.7.0 -> 2.8.0

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Only add [sources] section for test dependencies, not new deps

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
The PR incorrectly bumped sublibrary versions to their next versions (what they would be after the PR merges) instead of their current latest release versions. This commit reverts all sublibrary versions to their correct current release versions:

- BracketingNonlinearSolve: 1.4.0 → 1.3.0
- NonlinearSolveBase: 1.15.0 → 1.14.0
- NonlinearSolveFirstOrder: 1.8.0 → 1.7.0
- NonlinearSolveHomotopyContinuation: 0.2.0 → 0.1.5
- NonlinearSolveQuasiNewton: 1.9.0 → 1.8.0
- NonlinearSolveSciPy: 1.1.0 → 1.0.0
- NonlinearSolveSpectralMethods: 1.4.0 → 1.3.0
- SCCNonlinearSolve: 1.5.0 → 1.4.0
- SciMLJacobianOperators: 0.1.9 → 0.1.8
- SimpleNonlinearSolve: 2.8.0 → 2.7.0

Also updated the corresponding compat bounds in the main Project.toml file.
Add try-catch blocks around Hwloc.num_physical_cores() and
Hwloc.num_virtual_cores() calls to handle cases where Hwloc
fails (e.g., on some CI environments like macOS aarch64).

This fixes the ArgumentError: input string is empty or only
contains whitespace error that occurs when Hwloc functions
fail and return unexpected values.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants